
import Vue from 'vue'
import VueRouter from 'vue-router'//导入vue-router插件

// 全局注册VueRouter
Vue.use(VueRouter)

// 配置路由规则

//引入路由组件
import index from '../view/index.vue'
import emp from '../view/emp/emp.vue'
import user from '../view/user/user.vue'

//配置路由
const routes = [
    { path: '/index', component: index },
    { path: '/emp', component: emp },
    { path: '/user', component: user },
]

export default new VueRouter({
    routes//es6对象简写
})

